# 线性回归算法思想预测租金
def median(x):
    length = len(x)
    x.sort()
    if (length % 2)== 1:
        z=length // 2
        y = x[z]
    else:
        y = (x[length//2]+x[length//2-1])/2
    return y
